When an error occurs in a hard disk drive (HDD) due to smear, track squeeze, adjacent track interference, etc. affected sectors are reallocated, i.e., the logical block addresses (LBA) of the sectors are reallocated to a spare track. The LBAs of the reallocated sectors are contained in a so-called “grown defect list”, or “G-list” for short, which essentially is a list to which defects can be added as they are detected by error detection logic executed by the controller of the HDD.
It happens that when sectors are reallocated to spare tracks as a result of error recovery procedures, related LBAs may not be physically positioned next to each other. This is referred to as “fragmentation”. Fragmentation degrades HDD performance because extended seek time may be required to locate the related but physically separated blocks. Also, the HDD might have to wait for a complete extra revolution to read data that is fragmented, further degrading performance.
A user of a computer in which the HDD is mounted can cause the processor of the computer to execute defragmentation logic, but as recognized herein this is less than optimum. It requires user recognition of the need for defragmenting, and until that happens the HDD may perform substandardly. Also, the computer processor does not have access the G-list of the HDD, so that certain information such as LBA cross-referencing that can be contained in a G-list is not available to the computer.
In addition to the above-recognized drawbacks with current defragmentation methods, the present invention understands that the G-list as it grows can consume valuable space within the HDD, and that it consequently would be desirable to minimize the physical size of the G-list when possible.